package com.vrv.vap.baseline;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/env")
public class EnvController {
    private final Logger logger = LoggerFactory.getLogger(EnvController.class);
    @Value("${MYSQL_HOST:1.2.3.4}")
    private String host;

    @GetMapping
    public String getEnv() {
        logger.error(host);
        return System.getenv().toString();
    }
}
